<<<<<<< HEAD
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta content="no-cache" http-equiv="Cache-Control">
    <title>源之东方</title>
    <link href="__STATIC__/css/shopCar.css" rel="stylesheet"/>
    <style>
        a.disabled {
            pointer-events: none;
            filter: alpha(opacity=50); /*IE滤镜，透明度50%*/
            -moz-opacity: 0.5; /*Firefox私有，透明度50%*/
            opacity: 0.5; /*其他，透明度50%*/
        }
    </style>
</head>
<div class="nav footer fixed-bar" data-trackid="全站-底部导航">
    <a href="/" data-trackid="全站-底部导航-首页">首页</a>
    <a href="/category.html" data-trackid="全站-底部导航-分类">分类</a>
    <a href="/cart/0" class="on" data-trackid="全站-底部导航-购物车">购物车</a>
    <a href="/myself.html" data-trackid="全站-底部导航-我">我的</a>
</div><!-- //底部导航结束 -->
<body>


<div class="content">
    <div class="cart-main">
        <!--list-->
        <div class="cart-list">
            <div class="cart-shop">
                <div class="cart-title">购物车详情</div>
                <div class="cart-edit"><a href="javascript:;" class="btn btn-default cartEdit">编辑</a></div>
            </div>
            <div class="cart-box">
                    <!--/商品开始-->
                    {volist name="list" id='vo'}
                    <div {if condition="$mark == 1"} class="cart-group checked" {else /} class="cart-group" {/if} data-id="{$vo.id}" data-gid="{$vo.product_id}">
                        <div class="cart-icb"><input type="checkbox" name="shop" class="icon-checkbox setSelectAll"{if condition="$mark == 1"} data-status="1" {else /} data-status="0" {/if}></div>
                        <div class="cart-item">
                            <div class="small">
                                <div class="p">
                                    <a href="">
                                        <div class="ware-img ui-imglazyload" data-url="http://img.58bjcf.com/{$vo.url}"></div>
                                    </a>
                                </div>
                                <div class="d">
                                    <div class="d-main" id="sub_price_{$vo.id}">
                                        <div class="sub">
                                            <p class="quantity">{$vo.name} <i>x</i><span>{$vo.num}</span></p>
                                            <span class="price">
                                                <span class="s">￥<em class="n">{$vo.member_price}</em>(会员价)</span><span style="margin: 0 .5rem;font-size: 1.2rem;color: #999;">￥<span class="no_member">{$vo.price}</span>(市场价)</span>
                                            </span>
                                        </div>
                                        <div class="opt">
                                            <div class="number" data-id="{$vo.id}">
                                                <button type="button" class="decrease" data-pid="{$vo.id}" data-gid="{$vo.product_id}">-</button>
                                                <input type="number" class="num" min="1"  name="quantity" value="{$vo.num}"  id="price_{$vo.id}" readonly="readonly">
                                                <button type="button" class="increase" data-pid="{$vo.id}" data-gid="{$vo.product_id}">+</button>
                                            </div>
                                            <i class="icon-del"></i>
                                        </div>
                                    </div>
                                </div>
                            </div><!-- //单品结束 -->
                    </div>
                    </div>
                    {/volist}
                    <!-- /商品结束 -->
                    <div class="cart-footer" id="cart_footer">
                            <div class="cart-icb">
                                <input type="checkbox" name="shop" class="icon-checkbox selectAll" ></div>
                            <div class="cart-item">
                                <a class="btn btn-pay disabled"  url="buy.html">结算</a>
                                <div class="total">总计：<b>￥</b></div>
                                <div class="quantity">共<b></b>件商品</div>
                            </div>
                        </div>
                    </div>
            </div>
</div>
<script src="__STATIC__/js/zepto.min.js"></script>
<script src="__STATIC__/js/base.min.js"></script>
<script src="__STATIC__/js/shopin.js"></script>
<!--<script src="__STATIC__/js/cart.js"></script>-->
<script>
    
    ;(function () {
       
        //编辑
        $(".cart-main").find('.cart-list').each(function () {
            var obj = $(this);
            obj.find('.cartEdit').click(function () {
                if (!$(this).hasClass('active')) {
                    $(this).addClass('active').text('确定');
                    obj.addClass('editOrder');
             //     var id = $('.')
                } else {
                    $(this).removeClass('active').text('编辑');
                    obj.removeClass('editOrder');
                }
            });

            //全选
            obj.find('.selectAll').on('change', 'input', function () {
                var that = $(this);
                var check = parseInt(that.attr('data-check'));
                // $.ajax({
                //     type: 'post',
                //     url: '/changeAll',
                //     data: {type: check},
                //     success: function (data) {
                //         console.log(data);
                //         if (data.status == 1) {
                //             (check == 1) ? that.attr('data-check', 0) : that.attr('data-check', 1);
                //         }
                //     },
                //     error: function (e) {
                //         console.log(e);
                //     }
                // });
                var ssa = obj.find('.setSelectAll');
                var value = this.checked;
                if (value == true) {
                    for (var i = 0; i < ssa.length; i++) {
                        ssa[i].checked = true;
                        ssa.parent().parent().addClass('checked');
                    }
                } else {
                    for (var i = 0; i < ssa.length; i++) {
                        ssa[i].checked = false;
                        ssa.parent().parent().removeClass('checked');
                    }
                }
                setButton();
                setTotal();
            });

            // 选中/未选中
            obj.find('.setSelectAll').on('change', 'input', function () {
                var id = $(this).parent().parent().attr('data-id');
                var that = $(this);
                var status = $(this).attr('data-status');
                let sumPrice = 0;
                let goods=0;
               // console.log($('.cart-group').length)
               // console.log($(':checked').length)
               if ($('.cart-group').length ===
                        $('.icon-checkbox.setSelectAll:checked').length) {
                    $('.icon-checkbox.selectAll').prop("checked", true)
               }else{
                // console.log($('.cart-group').length)
                // console.log($('.icon-checkbox.setSelectAll:checked').length)
                $('.icon-checkbox.selectAll').prop("checked", false)
               }

                $(':checked').forEach(function(item){
                    //会员价
                    if({$mark} == 1){
                        var price =$(item).parent().siblings().find('.n').text();
                    }else{
                       var price =$(item).parent().siblings().find('.no_member').text();
                    }
                    const sum =$(item).parent().siblings().find('span').text();
                    sumPrice += sum*price;
                    sums = parseFloat(sum);
                    goods += sums;

                })
                // $('.quantity b').text(goods);
                // $('.total b').text('￥'+sumPrice+'元');
                setTotal();
                setButton();
                // $.ajax({
                //     url: '/changSelect',
                //     type: 'post',
                //     data: {
                //         id: id,
                //         status: status
                //     },
                //     success: function (data) {
                //         if (data.status == 1) {
                //             if (parseInt(status) == 1) {
                //                 that.parent().parent().removeClass('checked');
                //                 that.attr('data-status', 0);
                //             } else {
                //                 that.parent().parent().addClass('checked');
                //                 that.attr('data-status', 1);
                //             }

                //             var ssa = obj.find('.setSelectAll');
                //             var count = ssa.length;
                //             var selectCount = 0;
                //             var value = this.checked;
                //             for (var i = 0; i < count; i++) {
                //                 if (ssa[i].checked == true) {
                //                     selectCount++;
                //                 }
                //             }
                //             if (value == true) {
                //                 $(this).parent().parent().addClass('checked');
                //             } else {
                //                 $(this).parent().parent().removeClass('checked');
                //             }
                //             if (count == selectCount) {
                //                 obj.find('.selectAll').prop('checked', true);
                //             } else {
                //                 obj.find('.selectAll').prop('checked', false);
                //             }
                //             setButton();
                //             setTotal();
                //         }
                //     },
                //     error: function (e) {
                //     }
                // });
            });

            //删除
            obj.find('.icon-del').click(function () {
                var that = $(this);
                var id = that.parent().find('div').attr('data-id');
                $.ajax({
                    url: '/cart/delete/'+id,
                    type: 'delete',
                    success: function (data) {
                        var data = JSON.parse(data);
                        console.log(data)
                        if (data.code== 202) {
                            var len = obj.find('.cart-box .cart-group').length;
                            if (len <= 1) {
                                $(this).closest(".cart-list").remove();
                            } else {
                                $(this).closest(".cart-group").remove();
                            }
                            setTotal();
                            alert('删除成功！');
                            window.location.href='';
                        } else {
                            alert('删除失败，请稍后再试');
                        }
                    },
                    error: function (error) {
                        console.log(error);
                    }
                });
                var len = obj.find('.cart-box .cart-group').length;
                if (len <= 1) {
                    $(this).closest(".cart-list").remove();
                } else {
                    $(this).closest(".cart-group").remove();
                }
                setTotal();
            });

              //调整购买数量 新增
              obj.find(".increase").click(function () {
                var that = $(this);
                // var n = that.parent().find('.num');
                var pid = that.attr('data-pid');
                var gid = that.attr('data-gid');
                // console.log(pid)
                // console.log(gid)
                // console.log(n.text())
                let num = parseInt($('#price_'+pid).val()) + 1
                // console.log(parseInt(num) + 1)



                num > 99 || $.ajax({
                    url: '/cart/number',
                    type: 'post',
                    data: {
                        gid: gid,
                        num: num,
                        pid: pid
                    },
                    success: function (data1) {
                        // console.log(data1)
                        let data = JSON.parse(data1)
                            console.log(data)
                            console.log(num)
                            $('#price_'+pid).val(num)
                            $('.quantity span').text(num);
                            setTotal();

                        
                    },
                    error: function (error) {
                        console.log(error)
                    }
                });
                // ajax代码可以放这里传递到数据库实时改变总价
            });
            // 减少数量
            obj.find(".decrease").click(function () {
                var that = $(this);
                // var n = that.parent().find('.num');
                // var id = that.parent().attr('data-id');
                const pid = that.attr('data-pid');
                const gid = that.attr('data-gid');
                let num = parseInt($('#price_'+pid).val()) - 1
                // console.log(num < 0)
                num < 0 || $.ajax({
                    url: '/cart/number',
                    type: 'post',
                    data: {
                        gid: gid,
                        num: num,
                        pid: pid
                    },
                    success: function (data1) {
                      let data = JSON.parse(data1)
                      if (data.code == 200) {
                          // console.log(data)
                          // n.val(parseInt(n.val()) + 1);
                          // $('#sub_price_' + pid + ' p[class="quantity"] span').text(n.val());
                          console.log(num)
                          $('#price_'+pid).val(num);
                          $('.quantity span').text(num);
                                  // $('#sub_price div p[class="quantity"] span').text(parseInt(n.val()));
                              setTotal();
                          }
                    },
                    error: function (e) {

                    }
                });
            });

            obj.find('.num').blur(function () {
                setTotal();
            });

            //设置结算按钮的状态
            function setButton() {
                if (obj.find(".setSelectAll:checked").length > 0) {
                    obj.find('.btn-pay').removeClass('disabled');
                } else {
                    obj.find('.btn-pay').addClass('disabled');
                }
            }

              function setTotal(){
                let totalQuantity = 0
                let totalPrice = 0
                $('.cart-box').find(':checked').forEach(function(item){
                    // console.log($(item))
                    const info = $(item).parent().siblings()
                    const quantity = parseInt(info.find('.quantity span').text())
                    const price = parseFloat(info.find('.no_member').text())
                    // console.log($(item).parent().siblings().find('.quantity span').text())
                    // console.log($(item).parent().siblings().find('.no_member').text())
                    console.log(!!quantity, !!price)
                    if (!quantity || !price) {
                        return
                    }
                    totalQuantity += quantity
                    totalPrice += quantity * price
                })
                // console.log(totalQuantity, totalPrice)
                $('.total').children('b').text('￥' + totalPrice)
                $('.quantity').children('b').text(totalQuantity)
            }

             //结算
        $('.btn-pay').on('click',function(){
            if($(':checked')){
                var  goodsjson = [];
                $(':checked').forEach(function(info){
                    var that = $(info).parents('.cart-group');
                    goodsjson.push({
                        pid:that.attr('data-id'),
                        gid:that.attr('data-gid')
                     });
                })
                location.href='/cart/pay?goodslist='+JSON.stringify(goodsjson)



             }

        });
        });

    })();

</script>
</body>
</html>
=======
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta content="no-cache" http-equiv="Cache-Control">
    <title>源之东方</title>
    <link href="__STATIC__/css/shopCar.css" rel="stylesheet"/>
    <style>
        a.disabled {
            pointer-events: none;
            filter: alpha(opacity=50); /*IE滤镜，透明度50%*/
            -moz-opacity: 0.5; /*Firefox私有，透明度50%*/
            opacity: 0.5; /*其他，透明度50%*/
        }
    </style>
</head>
<div class="nav footer fixed-bar" data-trackid="全站-底部导航">
    <a href="/" data-trackid="全站-底部导航-首页">首页</a>
    <a href="/category.html" data-trackid="全站-底部导航-分类">分类</a>
    <a href="/cart/0" class="on" data-trackid="全站-底部导航-购物车">购物车</a>
    <a href="/myself.html" data-trackid="全站-底部导航-我">我的</a>
</div><!-- //底部导航结束 -->
<body>


<div class="content">
    <div class="cart-main">
        <!--list-->
        <div class="cart-list">
            <div class="cart-shop">
                <div class="cart-title">购物车详情</div>
                <div class="cart-edit"><a href="javascript:;" class="btn btn-default cartEdit">编辑</a></div>
            </div>
            <div class="cart-box">
                    <!--/商品开始-->
                    {volist name="list" id='vo'}
                    <div {if condition="$mark == 1"} class="cart-group checked" {else /} class="cart-group" {/if} data-id="{$vo.id}" data-gid="{$vo.product_id}">
                        <div class="cart-icb"><input type="checkbox" name="shop" class="icon-checkbox setSelectAll"{if condition="$mark == 1"} data-status="1" {else /} data-status="0" {/if}></div>
                        <div class="cart-item">
                            <div class="small">
                                <div class="p">
                                    <a href="">
                                        <div class="ware-img ui-imglazyload" data-url="http://img.58bjcf.com/{$vo.url}"></div>
                                    </a>
                                </div>
                                <div class="d">
                                    <div class="d-main" id="sub_price_{$vo.id}">
                                        <div class="sub">
                                            <p class="quantity">{$vo.name} <i>x</i><span>{$vo.num}</span></p>
                                            <span class="price">
                                                <span class="s">￥<em class="n">{$vo.member_price}</em>(会员价)</span><span style="margin: 0 .5rem;font-size: 1.2rem;color: #999;">￥<span class="no_member">{$vo.price}</span>(市场价)</span>
                                            </span>
                                        </div>
                                        <div class="opt">
                                            <div class="number" data-id="{$vo.id}">
                                                <button type="button" class="decrease" data-pid="{$vo.id}" data-gid="{$vo.product_id}">-</button>
                                                <input type="number" class="num" min="1"  name="quantity" value="{$vo.num}"  id="price_{$vo.id}" readonly="readonly">
                                                <button type="button" class="increase" data-pid="{$vo.id}" data-gid="{$vo.product_id}">+</button>
                                            </div>
                                            <i class="icon-del"></i>
                                        </div>
                                    </div>
                                </div>
                            </div><!-- //单品结束 -->
                    </div>
                    </div>
                    {/volist}
                    <!-- /商品结束 -->
                    <div class="cart-footer" id="cart_footer">
                            <div class="cart-icb">
                                <input type="checkbox" name="shop" class="icon-checkbox selectAll" ></div>
                            <div class="cart-item">
                                <a class="btn btn-pay disabled"  url="buy.html">结算</a>
                                <div class="total">总计：<b>￥</b></div>
                                <div class="quantity">共<b></b>件商品</div>
                            </div>
                        </div>
                    </div>
            </div>
</div>
<script src="__STATIC__/js/zepto.min.js"></script>
<script src="__STATIC__/js/base.min.js"></script>
<script src="__STATIC__/js/shopin.js"></script>
<!--<script src="__STATIC__/js/cart.js"></script>-->
<script>
    
    ;(function () {
       
        //编辑
        $(".cart-main").find('.cart-list').each(function () {
            var obj = $(this);
            obj.find('.cartEdit').click(function () {
                if (!$(this).hasClass('active')) {
                    $(this).addClass('active').text('确定');
                    obj.addClass('editOrder');
             //     var id = $('.')
                } else {
                    $(this).removeClass('active').text('编辑');
                    obj.removeClass('editOrder');
                }
            });

            //全选
            obj.find('.selectAll').on('change', 'input', function () {
                var that = $(this);
                var check = parseInt(that.attr('data-check'));
                // $.ajax({
                //     type: 'post',
                //     url: '/changeAll',
                //     data: {type: check},
                //     success: function (data) {
                //         console.log(data);
                //         if (data.status == 1) {
                //             (check == 1) ? that.attr('data-check', 0) : that.attr('data-check', 1);
                //         }
                //     },
                //     error: function (e) {
                //         console.log(e);
                //     }
                // });
                var ssa = obj.find('.setSelectAll');
                var value = this.checked;
                if (value == true) {
                    for (var i = 0; i < ssa.length; i++) {
                        ssa[i].checked = true;
                        ssa.parent().parent().addClass('checked');
                    }
                } else {
                    for (var i = 0; i < ssa.length; i++) {
                        ssa[i].checked = false;
                        ssa.parent().parent().removeClass('checked');
                    }
                }
                setButton();
                setTotal();
            });

            // 选中/未选中
            obj.find('.setSelectAll').on('change', 'input', function () {
                var id = $(this).parent().parent().attr('data-id');
                var that = $(this);
                var status = $(this).attr('data-status');
                let sumPrice = 0;
                let goods=0;
               // console.log($('.cart-group').length)
               // console.log($(':checked').length)
               if ($('.cart-group').length ===
                        $('.icon-checkbox.setSelectAll:checked').length) {
                    $('.icon-checkbox.selectAll').prop("checked", true)
               }else{
                // console.log($('.cart-group').length)
                // console.log($('.icon-checkbox.setSelectAll:checked').length)
                $('.icon-checkbox.selectAll').prop("checked", false)
               }

                $(':checked').forEach(function(item){
                    //会员价
                    if({$mark} == 1){
                        var price =$(item).parent().siblings().find('.n').text();
                    }else{
                       var price =$(item).parent().siblings().find('.no_member').text();
                    }
                    const sum =$(item).parent().siblings().find('span').text();
                    sumPrice += sum*price;
                    sums = parseFloat(sum);
                    goods += sums;

                })
                // $('.quantity b').text(goods);
                // $('.total b').text('￥'+sumPrice+'元');
                setTotal();
                setButton();
                // $.ajax({
                //     url: '/changSelect',
                //     type: 'post',
                //     data: {
                //         id: id,
                //         status: status
                //     },
                //     success: function (data) {
                //         if (data.status == 1) {
                //             if (parseInt(status) == 1) {
                //                 that.parent().parent().removeClass('checked');
                //                 that.attr('data-status', 0);
                //             } else {
                //                 that.parent().parent().addClass('checked');
                //                 that.attr('data-status', 1);
                //             }

                //             var ssa = obj.find('.setSelectAll');
                //             var count = ssa.length;
                //             var selectCount = 0;
                //             var value = this.checked;
                //             for (var i = 0; i < count; i++) {
                //                 if (ssa[i].checked == true) {
                //                     selectCount++;
                //                 }
                //             }
                //             if (value == true) {
                //                 $(this).parent().parent().addClass('checked');
                //             } else {
                //                 $(this).parent().parent().removeClass('checked');
                //             }
                //             if (count == selectCount) {
                //                 obj.find('.selectAll').prop('checked', true);
                //             } else {
                //                 obj.find('.selectAll').prop('checked', false);
                //             }
                //             setButton();
                //             setTotal();
                //         }
                //     },
                //     error: function (e) {
                //     }
                // });
            });

            //删除
            obj.find('.icon-del').click(function () {
                var that = $(this);
                var id = that.parent().find('div').attr('data-id');
                $.ajax({
                    url: '/cart/delete/'+id,
                    type: 'delete',
                    success: function (data) {
                        var data = JSON.parse(data);
                        console.log(data)
                        if (data.code== 202) {
                            var len = obj.find('.cart-box .cart-group').length;
                            if (len <= 1) {
                                $(this).closest(".cart-list").remove();
                            } else {
                                $(this).closest(".cart-group").remove();
                            }
                            setTotal();
                            alert('删除成功！');
                            window.location.href='';
                        } else {
                            alert('删除失败，请稍后再试');
                        }
                    },
                    error: function (error) {
                        console.log(error);
                    }
                });
                var len = obj.find('.cart-box .cart-group').length;
                if (len <= 1) {
                    $(this).closest(".cart-list").remove();
                } else {
                    $(this).closest(".cart-group").remove();
                }
                setTotal();
            });

              //调整购买数量 新增
              obj.find(".increase").click(function () {
                var that = $(this);
                // var n = that.parent().find('.num');
                var pid = that.attr('data-pid');
                var gid = that.attr('data-gid');
                // console.log(pid)
                // console.log(gid)
                // console.log(n.text())
                let num = parseInt($('#price_'+pid).val()) + 1
                // console.log(parseInt(num) + 1)



                num > 99 || $.ajax({
                    url: '/cart/number',
                    type: 'post',
                    data: {
                        gid: gid,
                        num: num,
                        pid: pid
                    },
                    success: function (data1) {
                        // console.log(data1)
                        let data = JSON.parse(data1)
                            console.log(data)
                            console.log(num)
                            $('#price_'+pid).val(num)
                            $('.quantity span').text(num);
                            setTotal();

                        
                    },
                    error: function (error) {
                        console.log(error)
                    }
                });
                // ajax代码可以放这里传递到数据库实时改变总价
            });
            // 减少数量
            obj.find(".decrease").click(function () {
                var that = $(this);
                // var n = that.parent().find('.num');
                // var id = that.parent().attr('data-id');
                const pid = that.attr('data-pid');
                const gid = that.attr('data-gid');
                let num = parseInt($('#price_'+pid).val()) - 1
                // console.log(num < 0)
                num < 0 || $.ajax({
                    url: '/cart/number',
                    type: 'post',
                    data: {
                        gid: gid,
                        num: num,
                        pid: pid
                    },
                    success: function (data1) {
                      let data = JSON.parse(data1)
                      if (data.code == 200) {
                          // console.log(data)
                          // n.val(parseInt(n.val()) + 1);
                          // $('#sub_price_' + pid + ' p[class="quantity"] span').text(n.val());
                          console.log(num)
                          $('#price_'+pid).val(num);
                          $('.quantity span').text(num);
                                  // $('#sub_price div p[class="quantity"] span').text(parseInt(n.val()));
                              setTotal();
                          }
                    },
                    error: function (e) {

                    }
                });
            });

            obj.find('.num').blur(function () {
                setTotal();
            });

            //设置结算按钮的状态
            function setButton() {
                if (obj.find(".setSelectAll:checked").length > 0) {
                    obj.find('.btn-pay').removeClass('disabled');
                } else {
                    obj.find('.btn-pay').addClass('disabled');
                }
            }

              function setTotal(){
                let totalQuantity = 0
                let totalPrice = 0
                $('.cart-box').find(':checked').forEach(function(item){
                    // console.log($(item))
                    const info = $(item).parent().siblings()
                    const quantity = parseInt(info.find('.quantity span').text())
                    const price = parseFloat(info.find('.no_member').text())
                    // console.log($(item).parent().siblings().find('.quantity span').text())
                    // console.log($(item).parent().siblings().find('.no_member').text())
                    console.log(!!quantity, !!price)
                    if (!quantity || !price) {
                        return
                    }
                    totalQuantity += quantity
                    totalPrice += quantity * price
                })
                // console.log(totalQuantity, totalPrice)
                $('.total').children('b').text('￥' + totalPrice)
                $('.quantity').children('b').text(totalQuantity)
            }

             //结算
        $('.btn-pay').on('click',function(){
            if($(':checked')){
                var  goodsjson = [];
                $(':checked').forEach(function(info){
                    var that = $(info).parents('.cart-group');
                    goodsjson.push({
                        pid:that.attr('data-id'),
                        gid:that.attr('data-gid')
                     });
                })
                location.href='/cart/pay?goodslist='+JSON.stringify(goodsjson)



             }

        });
        });

    })();

</script>
</body>
</html>
>>>>>>> 93c40d8086b7a8d5a9aa3548fdc8eb06a4272cf7
